<template>
  <!-- 编辑备注对话框 -->
  <div class="remark">
    <el-dialog
      title="编辑备注"
      :visible.sync="isRemark"
      width="30%"
      :before-close="cancel">
      <div class="remark-content">
        <div class="remark-title">备注</div>
        <div class="remark-text">
          <el-input
            type="textarea"
            :rows="3"
            placeholder="请输入"
            v-model="introduction"
            style="width:100%">
          </el-input>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
          <el-button type="success" @click="submit">确认</el-button>
          <el-button @click="cancel">取消</el-button>
        </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name:'remark',
  props: {
    isRemark:{
      type: Boolean,
      default: () => {
        return false
      }
    },
    id:{
      type: String,
      default: () => {
        return ''
      }
    }
  },
  data() {
    return {
      introduction:'',
    }
  },
  methods: {
    //提交
    submit(){
      this.cancel()
    },
    //取消
    cancel(){
      this.$emit('close',false);
    }
  }
}
</script>

<style lang="less" scoped>
.remark-content{
  display: flex;

  .remark-title{
    font-weight:bold;
    width:40px;
  }

  .remark-text {
    width: 100%;
  }
}
</style>
